import request from '@/api/request'

function findArticle(start, limit, data) {
    return request({
        url: `/lejuAdmin/productArticle/findArticles/${start}/${limit}`,
        data,
        method: 'POST'
    })
}

function delArticle(id, data) {
    return request({
        url: `/lejuAdmin/productArticle/del/${id}`,
        data,
        method: 'DELETE'
    })
}

function changeStatus(data) {
    return request({
        url: `/lejuAdmin/productArticle/changeShowStatus`,
        data,
        method: 'POST'
    })
}

function upload(data) {
    return request({
        url: `/lejuAdmin/material/uploadFileOss`,
        method: 'POST',
        data
    })
}

function addArticle(data) {
    return request({
        url: `/lejuAdmin/productArticle/addArticle`,
        method: 'POST',
        data
    })
}

function updataArticle(data) {
    return request({
        url: `/lejuAdmin/productArticle/updateArticle`,
        method: 'POST',
        data
    })
}
export {
    findArticle,
    delArticle,
    changeStatus,
    upload,
    addArticle,
    updataArticle
}